package hierarchy

import (
	"gitcode.com/G-YT/ANN/server/api/v1"
	"gitcode.com/G-YT/ANN/server/middleware"
	"github.com/gin-gonic/gin"
)

type FdArticleLearnRouter struct {
}

// InitFdArticleLearnRouter 初始化 FdArticleLearn 路由信息
func (s *FdArticleVideoRouter) InitFdArticleLearnRouter(Router *gin.RouterGroup, pubRouter *gin.RouterGroup) {
	fdArticleLearnRouter := Router.Group("fdArticleLearn").Use(middleware.OperationRecord())
	fdArticleLearnRouterPub := pubRouter.Group("fdArticleLearn")
	var fdArticleLearnApi = v1.ApiGroupApp.HierarchyApiGroup.FdArticleLearnApi
	{
		fdArticleLearnRouter.POST("createFdArticleLearn", fdArticleLearnApi.CreateFdArticleLearn)             // 新建学习文章
		fdArticleLearnRouter.DELETE("deleteFdArticleLearn", fdArticleLearnApi.DeleteFdArticleLearn)           // 删除学习文章
		fdArticleLearnRouter.DELETE("deleteFdArticleLearnByIds", fdArticleLearnApi.DeleteFdArticleLearnByIds) // 批量删除学习文章
		fdArticleLearnRouter.PUT("updateFdArticleLearn", fdArticleLearnApi.UpdateFdArticleLearn)              // 更新学习文章
		fdArticleLearnRouter.POST("setBuyArticle", fdArticleLearnApi.SetBuyArticle)                           // 设置购买学习文章
		fdArticleLearnRouter.GET("getLearnLevel", fdArticleLearnApi.GetLearnLevel)                            // 获取学习目录【健管师端】
		fdArticleLearnRouter.GET("getLearnArticleByHmId", fdArticleLearnApi.GetLearnArticleByHmId)            // 获取学习文章列表【健管师端】
	}
	{
		fdArticleLearnRouterPub.GET("getBuyArticle", fdArticleLearnApi.GetBuyArticle)                 // 获取购买学习文章
		fdArticleLearnRouterPub.GET("like", fdArticleLearnApi.FdArticleLike)                          // 喜欢学习文章
		fdArticleLearnRouterPub.GET("collect", fdArticleLearnApi.FdArticleCollect)                    // 收藏学习文章
		fdArticleLearnRouterPub.GET("findFdArticleLearn", fdArticleLearnApi.FindFdArticleLearn)       // 根据ID获取学习文章
		fdArticleLearnRouterPub.GET("getFdArticleLearnList", fdArticleLearnApi.GetFdArticleLearnList) // 获取学习文章列表
	}
}
